#pragma once 
#include <iostream>
#include "BlockQueue.hpp"
using namespace std;

class Task
{
  private:
    int x;
    int y;
    char op;
  public:
    Task(int _x, int _y, char _op)
      :x(_x)
      ,y(_y)
      ,op(_op)
    {}

    //一个无参数的构造函数 
    Task()
    {

    }
    void Run()
    {
      int res = 0;
      switch(op)
      {
        case '+':
          res = x+y;
          break;
        case '-':
          res = x-y;
          break;
        case '*':
          res = x*y;
          break;
        case '/':
          if(y == 0){
            cout<<"Warning :div zeros"<<endl;
            res = -1;
          }
          else{
            res = x/y;
          }
          break;
        default:
          break;
      }
      cout << x << op << y << "=" << res <<endl;
    }
    ~Task()
    {}

};
